import Vue from "vue";
import Vuex from "vuex"

Vue.use(Vuex)

const store = new Vuex.Store({
    state: {
        routes:[],
        currentAdmin: null,
    },
    //同步执行
    mutations: {
        INIT_CURRENTAdmin(state, admin) {
            state.currentAdmin = admin;
        },
        initRoutes(state,data){
            state.routes = data
        }
    },
    //异步执行
    actions:{

    }
})

export default store